package com.cy.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;

import java.time.LocalDateTime;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 
 * </p>
 *
 * @author cy
 * @since 2021-11-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 管理员id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 管理员名称
     */
    private String name;

    /**
     * 管理员密码
     */
    private String password;

    /**
     * 管理员状态（正常1，禁用0，离职2）
     */
    private Integer status;

    @TableField(fill = FieldFill.INSERT)
    /**
     * 管理员创建时间
     */
    private LocalDateTime createTime;

    /**
     * 备注信息
     */
    private String personinfo;


    public User(String name, String password, String personinfo) {
        this.name = name;
        this.password = password;
        this.personinfo = personinfo;
    }

    public User(Integer id, Integer status) {
        this.id = id;
        this.status = status;
    }
}
